import java.sql.*;
import java.util.*;
import java.util.stream.Collectors;

public class SQLtest {
//
//  public static void  main(String[] args) throws ClassNotFoundException, SQLException {
//      String url="jdbc:mysql://47.95.222.102:3306/test";
//      String user = "root";//用户名
//      String password = "root";//密码
//      Class.forName("com.mysql.jdbc.Driver");
//      Statement stmt = null;
//      Connection conn = DriverManager.getConnection(url, user, password);
//      stmt = conn.createStatement();
//
//      String sql="select now()  as data";
//      ResultSet rs = stmt.executeQuery(sql);
//
//      List<Map<String,Object>> dataList=new ArrayList<>();
////      while (rs.next()) {
////          ResultSetMetaData rsMeta=rs.getMetaData();
////          int columnCount=rsMeta.getColumnCount();
////          Map<String,Object> dataMap=new HashMap<>();
////          for (int i=1; i<=columnCount; i++) {
////              dataMap.put(rsMeta.getColumnLabel(i), rs.getObject(i));
////          }
////          dataList.add(dataMap);
////      }
//
//
//
//  }

   // stream test
    public static  void main(String args[]){
    List<Map<String,Object>> mapList=new ArrayList<>();
    Map<String,Object> objectMap=new HashMap<>();
    objectMap.put("name","haha");
    objectMap.put("id",12L);
    mapList.add(objectMap);
        objectMap=new HashMap<>();
        objectMap.put("name","haha2");
        objectMap.put("id",13L);
        mapList.add(objectMap);
      Conversion conversion=new Conversion();
      Set a=conversion.getColData(mapList,"id");
      System.out.println(a);


    }

}
